package cdp.tarasenko.epamevospring.repository;

import cdp.tarasenko.epamevospring.model.CityGeoLocation;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.data.mongodb.repository.Query;
import org.springframework.stereotype.Repository;

/**
 * @author Oleksandr_Tarasenko
 */
@Repository
public interface GeoLocationRepository extends MongoRepository<CityGeoLocation, String> {

    @Query(value = "{'city' : ?0}")
    CityGeoLocation findCityLocationByName(String name);
}
